import java.util.Scanner;

/**
 * Created by hps on 17-4-27.
 */
public class ReverseApp {
    public static void main(String[] args) {
        String input, output;
        while (true) {
            System.out.println("Enter a string(q to quit):");
            input = getString();
            if(input.equals("") || input.equals("q"))
                break;
            Reverser reverser = new Reverser(input);
            output = reverser.doRev();
            System.out.println("Reversed: " + output);
        }
    }

    public static String getString() {
        Scanner in = new Scanner(System.in);
        return in.nextLine();
    }
}
